home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
cbibcode.arc
/
POLY.C
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1991-08-05
|
270 b
|
11 lines
/* poly.c from page233*/
#include <stdio.h>
#include <math.h>
/*polynomial is: 3x**2 + 2x -1 */
double c[] = {-1.0, 2.0, 3.0};
main()
{ double value_at_10;
value_at_10 = poly(10.0, 2, c);
printf("3x**2 + 2x -1 evaluated at 10.0 =%f\n",
value_at_10);
}